<!DOCTYPE HTML>
<!--xmlns:th="http://www.thymeleaf.org"-->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title th:text="${sectionName}"></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="/bootstrap-3.3.7/css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="/bootstrap-3.3.7/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/bootstrap-3.3.7/css/skycommunity.css"/>
    <script src="/bootstrap-3.3.7/js/jquery-3.3.1.min.js"></script>
    <script src="/bootstrap-3.3.7/js/community.js"></script>
    <script src="/bootstrap-3.3.7/js/bootstrap.min.js" type="application/javascript"></script>
</head>
<body>

<div th:insert="~{navigation :: nav}"></div>
<div class="container-fluid main profile">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <h2><span th:text="${sectionName}"></span></h2>
            <hr>
            <!--我的问题的展示列表-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" th:if="${section=='questions'}">
                <div  class="media" th:each="question : ${pageInfoDTO.getDataType()}">
                    <div class="aw-item">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="" th:src="${question.user.getAvatarUrl()}">
                            </a>
                        </div>
                        <div class="media-body">
                            <h4 class="media-heading">
                                <a th:href="@{'/question/'+${question.id}}" th:text="${question.title}">怎么快速学会Spring Boot 开发</a>
                            </h4>
                            <!--<span th:text="${notification.description}">点击进入看视频</span><br>-->
                            <span class="text-desc"><span th:text="${question.commentCount}"></span>个回复 • <span
                                    th:text="${question.viewCount}"></span>次浏览 •
                        <span th:text="${#dates.format(question.gmtCreate,'yyyy-MM-dd HH:mm')}"></span></span>
                            <a th:href="@{'/publish/'+${question.id}}" style="margin-left: 10px" class="skymenu ">
								<span class="glyphicon glyphicon-pencil " aria-hidden="true">
								</span>
                                编辑
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <!--我的通知的列表-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" th:if="${section=='repies'}">
                <div  style="margin: 0 0 8px 0;border: 1px solid #ddd;border-radius: 4px;padding: 10px" class="media" th:each="notification : ${pageInfoDTO.getDataType()}">
                    <div class="aw-item">
                        <div class="media-left">
                                <img class="media-object img-rounded" src="" th:src="${notification.notifieravatarurl}">
                        </div>
                        <div class="media-body">
                            <h4 class="media-heading">
                                <span  th:text="${notification.notifierName}"></span>
                                <span style="color: #3c763d" th:if="${notification.type==1}" th:text="${notification.string}"></span>
                                <span  style="color: #0f0f0f" th:if="${notification.type==2}" th:text="${notification.string}"></span>
                                <span style="float: right;">
                                <span>
                                    <span  class="label label-danger" th:if="${notification.status==0}" >未读</span>
                                    <span  class="label label-success" th:if="${notification.status==1}">已读</span>
                                </span>
                            </span>
                            </h4>

                            <!--<span th:text="${notification.description}">点击进入看视频</span><br>-->
                            <a th:href="@{'/notification/'+${notification.id}}" th:text="${'<'+notification.outerTitle+'>'}"></a>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <nav aria-label="Page navigation" th:if="${pageInfoDTO.pages.size()>0}">
                <ul class="pagination">
                    <li th:if="${pageInfoDTO.showFirstPage}">
                        <a th:href="@{'/profile/'+${section}(page=${1})}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li th:if="${pageInfoDTO.showPrevious}">
                        <a th:href="@{'/profile/'+${section}(page=${pageInfoDTO.page - 1})}" aria-label="Previous">
                            <span aria-hidden="true">&lsaquo;</span>
                        </a>
                    </li>
                    <li th:each="page : ${pageInfoDTO.pages}" th:class="${pageInfoDTO.page==page}?'active':''"><a
                            th:href="@{'/profile/'+${section}(page=${page})}" th:text="${page}"></a></li>
                    <li th:if="${pageInfoDTO.showNext}">
                        <a th:href="@{'/profile/'+${section}(page=${pageInfoDTO.page + 1})}" aria-label="Next">
                            <span aria-hidden="true">&rsaquo;</span>
                        </a>
                    </li>
                    <li th:if="${pageInfoDTO.showEndPage}">
                        <a th:href="@{'/profile/'+${section}(page=${pageInfoDTO.totalPage})}" aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>
            </div>
        </div>

        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12 ">
            <div class="list-group section">
                <a href="/profile/questions" th:class="${section=='questions'}?'list-group-item active':'list-group-item'">
                    我的问题
                    <span class="badge" th:text="${questionCount}"></span>
                </a>
                <a href="/profile/repies" th:class="${section=='repies'}?'list-group-item active':'list-group-item'">
                    最新回复
                <span class="badge" th:text="${unreadCount== 0}?'[无]' : ${unreadCount}"></span>
                </a>

            </div>
        </div>
    </div>
</div>
</body>
</html>